/*
 * 05结构体嵌套结构体.c
 *
 *  Created on: 2024年3月15日
 *      Author: sulei_zhang
 */
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<time.h>

struct scores {
	int cl; // c语言
	int cpp; // c++
	int cs; // c#
};
struct student {
	char name[21];
	int age;
	struct scores ss;
	char addr[51];
};

int main0905(){
	struct student stu = {"貂蝉", 18, 99, 99, 98, "徐州"};
	printf("%s\n%d\n%d\n%d\n%d\n%s\n", stu.name, stu.age, stu.ss.cl, stu.ss.cpp, stu.ss.cs, stu.addr);

	struct student stu2;
	strcpy(stu2.name, "小乔");
	stu2.age = 20;
	stu2.ss.cl =88;
	stu2.ss.cpp =88;
	stu2.ss.cs =88;
	strcpy(stu2.addr, "江东");

	struct student stu3;
	printf("学生结构体大小：%d\n", sizeof(stu3));

	return 0;
}
